// 组件混入
module.exports = {
	props: {
		// 模块数据
		moduleData: {
			type: [Object, Array]
		},
		// 组件显示隐藏
		show: {
			type: Boolean,
			default: true
		},
		zIndex: {
			type: Number,
			default: 10
		},
		// 外间距
		margin: {
			type: String,
		},
		marginTop: {
			type: String,
		},
		marginRight: {
			type: String,
		},
		marginBottom: {
			type: String,
		},
		marginLeft: {
			type: String,
		},
		// 内间距
		padding: {
			type: String,
		},
		paddingTop: {
			type: String,
		},
		paddingRight: {
			type: String,
		},
		paddingBottom: {
			type: String,
		},
		paddingLeft: {
			type: String,
		},
		// 圆角
		borderRadius: {
			type: String,
		}
	},
	computed: {
		wrapStyle() {
			const {
				margin,
				marginTop,
				marginRight,
				marginBottom,
				marginLeft,
				padding,
				paddingTop,
				paddingRight,
				paddingBottom,
				paddingLeft
			} = this;
			return {
				'marginTop': margin ? '' : marginTop,
				'marginRight': margin ? '' : marginRight,
				'marginBottom': margin ? '' : marginBottom,
				'marginLeft': margin ? '' : marginLeft,
				'margin': margin,
				'paddingTop': padding ? '' : paddingTop,
				'paddingRight': padding ? '' : paddingRight,
				'paddingBottom': padding ? '' : paddingBottom,
				'paddingLeft': padding ? '' : paddingLeft,
				'padding': padding,
			}
		}
	},

	methods: {

	},

}
